import java.util.Date;


public class ExonUtilityMethod {

	 public static String replaceString(String s, String sMatch, String sReplace)
	    {
	        if (sReplace == null)
	            sReplace = "";
	        if (sMatch == null || "".equals(sMatch) || sMatch.equals(sReplace))
	            return s;
	        if (s == null || s.equals("")){
	            return "";
	        }
	        int i = 0;
	        int j = s.indexOf(sMatch);

	        if (j < 0){
	            return s;
	        }

	        StringBuffer sb = new StringBuffer(s.length());
	        while (true){
	            sb.append(s.substring(i, j));
	            sb.append(sReplace);
	            i = j + sMatch.length();
	            j = s.indexOf(sMatch, i);
	            if (j < 0)
	            {
	                sb.append(s.substring(i));
	                break;
	            }
	        }

	        return sb.toString();
	    }
	 public static void main(String[] args) {
		 
		 StringBuilder str =new StringBuilder("CLIF-EMEA Load Successful FOFDB.KZ FILE VERSION currentTimestamp FILE LOADED DATE & TIME FILE CREATED");
		
		 String newStr = ExonUtilityMethod.replaceString(str.toString(), "DATE & TIME", new Date().toString());
		 
		 System.out.println("new string"+newStr);
		 
	}
	
}
